package com.hand.wfive.loginAndVip;

public class VipConfig {

    // 0:永久会员、1:月度会员、2:季度会员、3:6个月会员 
    // 4:年度会员、5:2年会员、6:3年会员、7:次卡、8:天卡

    public static final String FOREVER_VIP_NAME = "永久会员";
    public final static String FOREVER_VIP_TYPE = "0";

    public static final String MONTH_VIP_NAME = "月度会员";
    public final static String MONTH_VIP_TYPE = "1";

    public static final String QUARTER_VIP_NAME = "季度会员";
    public final static String QUARTER_VIP_TYPE = "2";

    public static final String MONTH6_VIP_NAME = "6个月会员";
    public final static String MONTH6_VIP_TYPE = "3";

    public static final String YEAR_VIP_NAME = "年度会员";
    public final static String YEAR_VIP_TYPE = "4";

    public static final String YEAR2_VIP_NAME = "2年会员";
    public final static String YEAR2_VIP_TYPE = "5";

    public static final String YEAR3_VIP_NAME = "3年会员";
    public final static String YEAR3_VIP_TYPE = "6";

    public final static String NUM_VIP_NAME = "次卡";
    public final static String NUM_VIP_TYPE = "7";

    public final static String DAY_VIP_NAME = "天卡";
    public final static String DAY_VIP_TYPE = "8";

    public static String getVipValueByText(String vipText) {
        switch (vipText) {
            case FOREVER_VIP_NAME:
                return FOREVER_VIP_TYPE;
            case MONTH_VIP_NAME:
                return MONTH_VIP_TYPE;
            case QUARTER_VIP_NAME:
                return QUARTER_VIP_TYPE;
            case MONTH6_VIP_NAME:
                return MONTH6_VIP_TYPE;
            case YEAR_VIP_NAME:
                return YEAR_VIP_TYPE;
            case YEAR2_VIP_NAME:
                return YEAR2_VIP_TYPE;
            case YEAR3_VIP_NAME:
                return YEAR3_VIP_TYPE;
            case NUM_VIP_NAME:
                return NUM_VIP_TYPE;
            case DAY_VIP_NAME:
                return DAY_VIP_TYPE;
            default:
                return "-1";
        }
    }

    public static String getVipLableByValue(String value) {
        switch (value) {
            case FOREVER_VIP_TYPE:
                return FOREVER_VIP_NAME;
            case MONTH_VIP_TYPE:
                return MONTH_VIP_NAME;
            case QUARTER_VIP_TYPE:
                return QUARTER_VIP_NAME;
            case MONTH6_VIP_TYPE:
                return MONTH6_VIP_NAME;
            case YEAR_VIP_TYPE:
                return YEAR_VIP_NAME;
            case YEAR2_VIP_TYPE:
                return YEAR2_VIP_NAME;
            case YEAR3_VIP_TYPE:
                return YEAR3_VIP_NAME;
            case NUM_VIP_TYPE:
                return NUM_VIP_NAME;
            case DAY_VIP_TYPE:
                return DAY_VIP_NAME;
            default:
                return "未开通会员";
        }
    }

}
